package com.zhima.exception;

public class ZhimaOjException extends RuntimeException {
    public String message;
    public Throwable exception;


    public ZhimaOjException(Throwable e, ErrorCode errorCode) {
        super(errorCode.getErrorMessage(), e);
        this.exception = e;
        this.message = errorCode.getErrorMessage();
    }

    public ZhimaOjException(ErrorCode errorCode) {
        super(errorCode.getErrorMessage());
        this.message = errorCode.getErrorMessage();
    }

    public ZhimaOjException(String errorMessage) {
        super(errorMessage);
        this.message = errorMessage;
    }
}
